package sam.jmsgserver.core;

import org.jivesoftware.smack.Connection;
import org.jivesoftware.smack.packet.Message;

public class ErrorMsgTask implements Runnable{
	private Message msg;
	private Connection connection;

	public void run(){
		Server.logger.info("=> ErrorMsgTask.run()");
		
		if (this.msg!=null && this.msg.getBody()!=null){
			Server.logger.info("from:"+this.msg.getFrom());
			Server.logger.info("language:"+this.msg.getLanguage());
			Server.logger.info("packetID:"+this.msg.getPacketID());
			Server.logger.info("subject:"+this.msg.getSubject());
			Server.logger.info("to:"+this.msg.getTo());
			Server.logger.info("xmlns:"+this.msg.getXmlns());
			Server.logger.info("type:"+this.msg.getType());
			Server.logger.info("body:"+this.msg.getBody());
			
		}
		
		Server.logger.info("<= ErrorMsgTask.run()");
	}
	
	public Message getMsg() {
		return msg;
	}

	public void setMsg(Message msg) {
		this.msg = msg;
	}

	public Connection getConnection() {
		return connection;
	}

	public void setConnection(Connection connection) {
		this.connection = connection;
	}
}
